/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.mallsite.modules.shop.entity;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 商品属性Entity
 * @author ruyang
 * @version 2020-12-04
 */
@Table(name="ms_goods_attr_val", alias="a", columns={
		@Column(name="attr_val_id", attrName="attrValId", label="类型编码", isPK=true),
		@Column(name="goods_id", attrName="goodsId", label="商品id"),
		@Column(name="attr_id", attrName="attrId", label="属性id"),
		@Column(name="attr_val", attrName="attrVal", label="属性值"),
	}, orderBy="a.attr_val_id DESC"
)
public class GoodsAttrVal extends DataEntity<GoodsAttrVal> {
	
	private static final long serialVersionUID = 1L;
	private String attrValId;		// 类型编码
	private String goodsId;		// 商品id
	private String attrId;		// 属性id
	private String attrVal;		// 属性值
	
	public GoodsAttrVal() {
		this(null);
	}

	public GoodsAttrVal(String id){
		super(id);
	}
	
	public String getAttrValId() {
		return attrValId;
	}

	public void setAttrValId(String attrValId) {
		this.attrValId = attrValId;
	}
	
	@NotBlank(message="商品id不能为空")
	@Length(min=0, max=128, message="商品id长度不能超过 128 个字符")
	public String getGoodsId() {
		return goodsId;
	}

	public void setGoodsId(String goodsId) {
		this.goodsId = goodsId;
	}
	
	@NotBlank(message="属性id不能为空")
	@Length(min=0, max=128, message="属性id长度不能超过 128 个字符")
	public String getAttrId() {
		return attrId;
	}

	public void setAttrId(String attrId) {
		this.attrId = attrId;
	}
	
	@NotBlank(message="属性值不能为空")
	public String getAttrVal() {
		return attrVal;
	}

	public void setAttrVal(String attrVal) {
		this.attrVal = attrVal;
	}
	
}